import sys

base = int(sys.argv[1],0)
values = sys.argv[2:]

print >>sys.stderr, base
for i in xrange(0, base):
    sys.stdout.write('%c' % 0x31)

for i, value in enumerate(values):
    sys.stdout.write('%c' % int(value,0))


